﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using Utilities.IO;

namespace Utilities.Media.Audio.Pcm
{
    public class PcmStream : AudioStream
    {
        public PcmStream(DataStream stream, short numChannels, short bitsPerSample, int sampleRate) : base(stream)
        {
            NumChannels = numChannels;
            BitsPerSample = bitsPerSample;
            SampleRate = sampleRate;
        }

        public override AudioBuffer ReadBuffer()
        {
            AudioBuffer buffer = new AudioBuffer(NumChannels, BitsPerSample, SampleRate, new TimeSpan(0, 0, 0, 1));
            BaseStream.Read(buffer.Data, 0, buffer.Data.Length);
            return buffer;
        }

        public override void WriteBuffer(AudioBuffer buffer)
        {
            throw new NotImplementedException();
        }

        public override bool CanRead
        {
            get { throw new NotImplementedException(); }
        }

        public override bool CanSeek
        {
            get { throw new NotImplementedException(); }
        }

        public override bool CanWrite
        {
            get { throw new NotImplementedException(); }
        }

        public override void Flush()
        {
            throw new NotImplementedException();
        }

        public override long Length
        {
            get { throw new NotImplementedException(); }
        }

        public override long Position
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public override int Read(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }

        public override long Seek(long offset, SeekOrigin origin)
        {
            throw new NotImplementedException();
        }

        public override void SetLength(long value)
        {
            throw new NotImplementedException();
        }

        public override void Write(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }
    }
}
